<template>
  <div class="withdraw-record">
    <!-- 搜索栏 -->
    <div class="search-block">
      <div class="item-msg">
        <label>状态</label>
        <el-select v-model="searchForm.role" placeholder="全部" size="medium">
          <el-option v-for="item in roleList" :key="item.id" :label="item.name" :value="item.id"></el-option>
        </el-select>
      </div>
      <div class="item-msg">
        <label>币种</label>
        <el-select v-model="searchForm.role" placeholder="全部" size="medium">
          <el-option v-for="item in roleList" :key="item.id" :label="item.name" :value="item.id"></el-option>
        </el-select>
      </div>
      <div class="item-msg">
        <label>初审员</label>
        <el-select v-model="searchForm.role" placeholder="全部" size="medium">
          <el-option v-for="item in roleList" :key="item.id" :label="item.name" :value="item.id"></el-option>
        </el-select>
      </div>
      <div class="item-msg">
        <label>复审员</label>
        <el-select v-model="searchForm.role" placeholder="全部" size="medium">
          <el-option v-for="item in roleList" :key="item.id" :label="item.name" :value="item.id"></el-option>
        </el-select>
      </div>
      <br>
      <div class="item-msg">
        <label>用户</label>
        <el-input v-model="searchForm.uid" clearable size="medium" placeholder="用户姓名/UID"></el-input>
      </div>
      <div class="item-msg">
        <label>提交时间</label>
        <el-date-picker
          size="medium"
          v-model="searchForm.times"
          type="daterange"
          value-format="timestamp"
          range-separator="至"
          start-placeholder="开始日期"
          end-placeholder="结束日期"
        ></el-date-picker>
      </div>
      <el-button class="search-btn" @click="search()" size="medium" type="primary">查询</el-button>
      <el-button class="search-btn" size="medium">导出</el-button>
    </div>
    <!-- 数据表 -->
    <div class="data-table">
      <el-table
        v-loading="loading"
        element-loading-text="拼命加载中..."
        element-loading-spinner="el-icon-loading"
        element-loading-background="rgba(211, 215, 212, 0.5)"
        :data="tableData"
        stripe
        header-cell-class-name="headerStyle"
        style="width: 100%"
      >
        <el-table-column align="center" prop="uid" label="流水编号" width="120"></el-table-column>
        <el-table-column align="center" label="UID" width="100">
          <template slot-scope="item">{{item.row.name||'/'}}</template>
        </el-table-column>
        <el-table-column align="center" prop="roleName" label="姓名"></el-table-column>
        <el-table-column align="center" label="手机号"></el-table-column>
        <el-table-column align="center" label="币种"></el-table-column>
        <el-table-column align="center" label="数量"></el-table-column>
        <el-table-column align="center" label="对方地址"></el-table-column>
        <el-table-column align="center" label="内部提币"></el-table-column>
        <el-table-column align="center" width="165" label="提交时间">
          <template slot-scope="item">{{item.row.createTime|fulltime}}</template>
        </el-table-column>
        <el-table-column align="center" width="165" label="完成时间">
          <template slot-scope="item">{{item.row.createTime|fulltime}}</template>
        </el-table-column>
        <el-table-column align="center" label="钱包"></el-table-column>
        <el-table-column align="center" label="状态"></el-table-column>
      </el-table>
      <!-- 分页 -->
      <pages
        :pages="searchForm"
        :total="total"
        @pageSizeChange="pageSizeChange"
        @pageChange="pageChange"
      ></pages>
    </div>
  </div>
</template>

<script>
import Pages from "@/components/PageBox.vue";
export default {
  components: {
    Pages
  },
  data() {
    return {
      loading: false,
      searchForm: {
        name: "",
        uid: "",
        phone: "",
        role: "",
        startTime: "",
        endTime: "",
        times: null,
        page: 1,
        size: 10
      },
      roleList: [],
      tableData: [],
      total: 10
    };
  },
  methods: {
    search() {},
    pageChange(val) {
      this.searchForm.page = val;
      this.search(val);
    },
    pageSizeChange(val) {
      this.searchForm.size = val;
      this.search();
    }
  }
};
</script>

<style lang="scss" scoped>
.withdraw-record {
  .search-block {
    width: 100%;
    padding: 25px 30px;
    border-radius: 5px;
    background: #fff;
    box-shadow: rgba(0, 0, 0, 0.1) 0 0 15px;
    .item-msg {
      display: inline-block;
      margin-right: 20px;
      height: 60px;
      line-height: 60px;
      font-size: 1 size= "medium" 4;
      color: $admin_font_param;
      label {
        display: inline-block;
        min-width: 80px;
        text-align: right;
        margin-right: 10px;
      }
      .el-input {
        width: 150px;
      }
      .el-select {
        width: 150px;
      }
      .el-date-editor {
        width: 270px;
      }
    }
    .search-btn {
      margin-left: 30px;
    }
    .search-btn:nth-of-type(1) {
      margin-left: 50px;
    }
  }
  .data-table {
    padding-bottom: 20px;
    background: #fff;
    border-radius: 5px;
    margin-top: 30px;
    box-shadow: rgba(0, 0, 0, 0.1) 0 0 15px;
  }
}
</style>